<!DOCTYPE html>
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<?php
		$baseScriptUrl = Yii::app()->assetManager->publish(dirname(__FILE__) . '/../../wwwroot');
		Yii::app()->getClientScript()->registerCssFile($baseScriptUrl.'/css/bootstrap.min.css');
		Yii::app()->getClientScript()->registerCssFile($baseScriptUrl.'/css/main.css');
	?>
	
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/css/bootstrap.css" media="screen, projection" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/css/responsive.css" media="print" />
	<!--link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/css/login.css"/-->
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/css/base.css"/>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/css/admin.css"/>
	
	<!-- blueprint CSS framework -->
	<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/js/jquery.min.js">	</script>
	<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/js/bootstrap.min.js">	</script>
	<!--script type="text/javascript" src="< ?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/js/modernizr.custom.32549.js">	</script>
	<script type="text/javascript" src="< ?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/js/enquire.min.js">	</script>
	<script type="text/javascript" src="< ?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/js/jquery.uniform.min.js">	</script>
	<script type="text/javascript" src="< ?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/js/jquery.tinyscrollbar.min.js">	</script>
	<script type="text/javascript" src="< ?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/js/jquery.sparkline.min.js">	</script>
	<script type="text/javascript" src="< ?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/js/jquery.touchdown.js">	</script-->
	<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/js/main.js">	</script>
	<style>
	div.form{margin-left:20px;}
	div.form span.required,.errorMessage{color:red;}
	</style>
</head>
<body>
<div class="navbar navbar-fixed-top">
	<div class="navbar-inner">
	<div class="container-fluid">
	  <div class="nav-collapse">
				<a class="brand" href="#">Manage system</a>
				<ul class="nav">
					<li class="active"><?php echo CHtml::link(UserModule::t('Dashboard'),array('/user/admin')); ?></li>
					<!--li class="dropdown">
						<a class="dropdown-toggle" data-toggle="dropdown" href="#">Manage ...<b class="caret"></b></a>
						<ul class="dropdown-menu">
							<li>< ?php echo CHtml::link(UserModule::t('Manage...'),array('/contacts/manageContacts/admin')); ?></li>
							<li><a href="#">Manage ...</a></li>
						</ul>
					</li-->
					<?php //if(UserModule::isAdmin()) { ?>
					<li><?php echo CHtml::link(UserModule::t('Manage users'),array('/user/admin')); ?></li>
					<?php //} ?>
				</ul>
				<!--form class="navbar-form pull-left">
					<input type="text" class="search-query span2" placeholder="Search">
				</form-->
				<div class="btn-group pull-right">
					<?php
						//CVarDumper::dump(Yii::app()->user->name, 5, true);	exit;
						if(!Yii::app()->user->isGuest ) {
							$login_user = Yii::app()->user->name;
						} else {
							//$login_user = new stdClass();
							//$login_user	= array();
							//$login_user->username = new stdClass();
							$login_user = "Guest";
						}
					?>
			<a href="#" data-toggle="dropdown" class="btn dropdown-toggle">
			  <i class="icon-user"></i> <?=$login_user; ?>
			  <span class="caret"></span>
			</a>
			<ul class="dropdown-menu">
			  <li><?php echo CHtml::link(UserModule::t('<i class="icon-user"></i>Profile'),array('/user/profile')); ?></li>
			  <li class="divider"></li>
			  <li><?php echo CHtml::link(UserModule::t('<i class="icon-remove-sign"></i>Logout'),array('/user/logout')); ?></li>
			</ul>
		 </div>
			</div>
		</div>
	</div>
</div>

<!--div id="loading"><img src="< ?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/img/ajax-loader.gif"></div>
<div id="responsive_part">
  <div class="logo"> <a href="index.html"><span>Start</span><span class="icon"></span></a> </div>
  <ul class="nav responsive">
	 <li>
		<button class="btn responsive_menu icon_item" data-toggle="collapse" data-target=".overview"> <i class="icon-reorder"></i> </button>
	 </li>
  </ul>
</div-->
<div class="container-fluid">
	<div id="sidebar" class="collapse1 in">
		<div class="viewport ">
			<div class="overview collapse">
				<ul id="sidebar_menu" class="navbar nav nav-list container full">
					<li class="accordion-group  color_4"> <a class="dashboard" href="/user/admin">
						<img src="<?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/img/menu_icons/dashboard.png"><span>Dashboard</span></a> 
					</li>
					<li class="accordion-group color_19 active"> 
						<a class="accordion-toggle widgets collapsed " data-toggle="collapse" data-parent="#sidebar_menu" href="#collapse1"> <img src="<?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/img/menu_icons/users.png"><span>Manage uses</span></a>
						<ul id="collapse1" class="accordion-body collapse <?php echo ($this->module->id == 'user' && !(Yii::app()->controller->id == 'profile')) ?  'in' : '' ; ?>">
							<li><?php echo CHtml::link(UserModule::t('<i class="icon-th-list"></i>Manage User'),array('/user/admin')); ?></li>
							<li><?php echo CHtml::link(UserModule::t('<i class="icon-user"></i>Create user'),array('/user/admin/create')); ?></li>
						</ul>
					</li>
					<li class="accordion-group color_3 active"> 
						<a class="accordion-toggle widgets collapsed " data-toggle="collapse" data-parent="#sidebar_menu" href="#collapse2"> <img src="<?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/img/menu_icons/profile.png"><span>Manage your account</span></a>
						<ul id="collapse2" class="accordion-body collapse <?php echo ($this->module->id == 'user' && Yii::app()->controller->id == 'profile') ?  'in' : '' ; ?>">
							<li><?php echo CHtml::link(UserModule::t('<i class="icon-user"></i>Profile'),array('/user/profile')); ?></li>
							<li><?php echo CHtml::link(UserModule::t('<i class="icon-edit"></i>Edit'),array('/user/profile/edit')); ?></li>
							<li><?php echo CHtml::link(UserModule::t('<i class="icon-edit"></i>Change password'),array('/user/profile/changepassword')); ?></li>
							<li><?php echo CHtml::link(UserModule::t('<i class="icon-remove-sign"></i>Logout'),array('/user/logout')); ?></li>
						</ul>
					</li>
					<li class="accordion-group color_1 active"> 
						<a class="accordion-toggle widgets collapsed " data-toggle="collapse" data-parent="#sidebar_menu" href="#collapse4"> <img src="<?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/img/menu_icons/icon_content_small.gif"><span>Manage content</span></a>
						<ul id="collapse4" class="accordion-body collapse <?php echo ($this->module->id == 'user' && Yii::app()->controller->id == 'staticPage') ?  'in' : '' ; ?>">
							<li><?php echo CHtml::link(UserModule::t('<i class="icon-info-sign"></i>Manage Static pages'),array('/static_pages/manageStaticPages/admin')); ?></li>
							<li><?php echo CHtml::link(UserModule::t('<i class="icon-plus-sign"></i>Create Static page'),array('/static_pages/manageStaticPages/create')); ?></li>
						</ul>
					</li>
					<li class="accordion-group color_9 active"> 
						<a class="accordion-toggle widgets collapsed " data-toggle="collapse" data-parent="#sidebar_menu" href="#collapse9"> <img src="<?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/img/menu_icons/glyphicons_039_notes.png"><span>Manage Categories</span></a>
						<ul id="collapse9" class="accordion-body collapse <?php echo ($this->module->id == 'categories' && Yii::app()->controller->id == 'manage') ?  'in' : '' ; ?>">
							<li><?php echo CHtml::link(UserModule::t('<i class="icon-info-sign"></i>List Categories'),array('/categories/manage')); ?></li>
							<li><?php echo CHtml::link(UserModule::t('<i class="icon-plus-sign"></i>Create Category'),array('/categories/manage/create')); ?></li>
						</ul>
					</li>
					<li class="accordion-group color_8 active"> 
						<a class="accordion-toggle widgets collapsed " data-toggle="collapse" data-parent="#sidebar_menu" href="#collapse8"> <img src="<?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/img/menu_icons/glyphicons_336_iphone_shake.png"><span>Manage products</span></a>
						<ul id="collapse8" class="accordion-body collapse <?php echo ($this->module->id == 'admin' && Yii::app()->controller->id == 'product') ?  'in' : '' ; ?>">
							<li><?php echo CHtml::link(UserModule::t('<i class="icon-info-sign"></i>List product'),array('/admin/product')); ?></li>
							<li><?php echo CHtml::link(UserModule::t('<i class="icon-plus-sign"></i>Create product'),array('/admin/product/create')); ?></li>
						</ul>
					</li>
					<li class="accordion-group color_5 active"> 
						<a class="accordion-toggle widgets collapsed " data-toggle="collapse" data-parent="#sidebar_menu" href="#collapse88"> <img src="<?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/img/menu_icons/glyphicons_039_notes.png"><span>Manage condition</span></a>
						<ul id="collapse88" class="accordion-body collapse <?php echo ($this->module->id == 'products' && Yii::app()->controller->id == 'gadgetcondition') ?  'in' : '' ; ?>">
							<li><?php echo CHtml::link(UserModule::t('<i class="icon-info-sign"></i>List condition'),array('/products/gadgetcondition')); ?></li>
							<li><?php echo CHtml::link(UserModule::t('<i class="icon-plus-sign"></i>Create condition'),array('/products/gadgetcondition/create')); ?></li>
						</ul>
					</li>
					<li class="accordion-group color_4 active"> 
						<a class="accordion-toggle widgets collapsed " data-toggle="collapse" data-parent="#sidebar_menu" href="#collapse888"> <img src="<?php echo Yii::app()->request->baseUrl.WWWROOT_BACKEND; ?>/img/menu_icons/glyphicons_325_wallet.png"><span>Manage Customer</span></a>
						<ul id="collapse888" class="accordion-body collapse <?php echo ($this->module->id == 'customer' && Yii::app()->controller->id == 'manage') ?  'in' : '' ; ?>">
							<li><?php echo CHtml::link(UserModule::t('<i class="icon-info-sign"></i>Manage customer quote'),array('/customer/customerquote')); ?></li>
							<li><?php echo CHtml::link(UserModule::t('<i class="icon-info-sign"></i>List customer'),array('/customer/manage')); ?></li>
							
						</ul>
					</li>
				</ul>
			</div>
		</div>
	</div>
	
	
	<div id="main">
		<div class="container">
			<div id="main_container">
				<div class="row-fluid">
					<?php echo $content; ?>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
</html>
